﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.IO;

namespace MediaCenter
{
    class StartMovie
    {
        public StartMovie()
        {
        }

        internal void watchMovie(string path)
        {
            string vlc = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe";
            if (!Directory.Exists("C:\\Program Files (x86)\\VideoLAN\\VLC")) 
            {
                vlc = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe";
            }
            ProcessStartInfo psI = new ProcessStartInfo(vlc);
            Process p = new Process();
            psI.Arguments = "\""+path+"\""/* + " -f"*/;
            psI.LoadUserProfile = true;
            psI.UseShellExecute = false;
            psI.RedirectStandardInput = true;
            psI.RedirectStandardOutput = true;
            p.StartInfo = psI;
            p.Start();   
        }
    }
}
